commit fa6fd01f7862245bd2ef1193fd504a2c8b53c10f
Author: Daniel Kolesa <daniel@octaforge.org>
Date:   Thu Mar 16 18:55:28 2023 +0100

    vec_splats is not a compile-time constant

diff --git a/src/ppc/looprestoration_tmpl.c b/src/ppc/looprestoration_tmpl.c
index c0c64e1..970ad22 100644
--- a/src/ppc/looprestoration_tmpl.c
+++ b/src/ppc/looprestoration_tmpl.c
@@ -28,6 +28,8 @@
 #include "src/ppc/dav1d_types.h"
 #include "src/ppc/looprestoration.h"
 
+#define const_splats(t, i) ((vector t)((t)i))
+
 #if BITDEPTH == 8
 
 #define REST_UNIT_STRIDE (400)
@@ -50,12 +52,12 @@ static void wiener_filter_h_vsx(int32_t *hor_ptr,
                                 const int16_t filterh[8],
                                 const int w, const int h)
 {
-    const i32x4 zerov = vec_splats(0);
-    const i32x4 seven_vec = vec_splats(7);
-    const i32x4 bitdepth_added_vec = vec_splats(1 << 14);
-    const i32x4 round_bits_vec = vec_splats(3);
-    const i32x4 rounding_off_vec = vec_splats(1<<2);
-    const i32x4 clip_limit_v = vec_splats((1 << 13) - 1);
+    const i32x4 zerov = const_splats(int, 0);
+    const i32x4 seven_vec = const_splats(int, 7);
+    const i32x4 bitdepth_added_vec = const_splats(int, 1 << 14);
+    const i32x4 round_bits_vec = const_splats(int, 3);
+    const i32x4 rounding_off_vec = const_splats(int, 1<<2);
+    const i32x4 clip_limit_v = const_splats(int, (1 << 13) - 1);
 
     i16x8 filterhvall = vec_vsx_ld(0, filterh);
     i16x8 filterhv0 =  vec_splat( filterhvall, 0);
@@ -128,8 +130,8 @@ static void wiener_filter_h_vsx(int32_t *hor_ptr,
 }
 
 static inline i16x8 iclip_u8_vec(i16x8 v) {
-    const i16x8 zerov = vec_splats((int16_t)0);
-    const i16x8 maxv = vec_splats((int16_t)255);
+    const i16x8 zerov = const_splats(short, 0);
+    const i16x8 maxv = const_splats(short, 255);
     v = vec_max(zerov, v);
     v = vec_min(maxv, v);
     return v;
@@ -175,8 +177,8 @@ static inline void wiener_filter_v_vsx(uint8_t *p,
                                        const int16_t filterv[8],
                                        const int w, const int h)
 {
-    const i32x4 round_bits_vec = vec_splats(11);
-    const i32x4 round_vec = vec_splats((1 << 10) - (1 << 18));
+    const i32x4 round_bits_vec = const_splats(int, 11);
+    const i32x4 round_vec = const_splats(int, (1 << 10) - (1 << 18));
 
     i32x4 filterv0 =  vec_splats((int32_t) filterv[0]);
     i32x4 filterv1 =  vec_splats((int32_t) filterv[1]);
